<template>
  <div class="child">
    <h4>我是Child1</h4>
    <p>我的count的值是{{ count }}</p>
    <button @click="$parent.count++">改变父组件的count</button>
    <button @click="$parent.num++">改变父组件的num</button>
  </div>
</template>

<script>
export default {
  name: "Child1",
  data() {
    return {
      count: 0,
    };
  },
  mounted() {
    console.log(this.$parent, 111);
  },
};
</script>

<style scoped>

</style>
